package com.xinshujia.dao;

import com.xinshujia.entity.QuartzEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * *************************************
 * *   @author: 野狼上校               **
 * *   @since: 2024-07-23 14:42       **
 * *   @version: 1.0                  **
 * *************************************
 * <p>
 *     // , PagingAndSortingRepository<QuartzEntity, Long>
 */
@Repository
public interface QuartzDao extends JpaRepository<QuartzEntity, Long> {
    /**
     * 根据jobName（deviceGuid）查询
     */
    @Query(value = "SELECT * FROM blade_quartz WHERE job_name = :jobName", nativeQuery = true)
//    @Query("FROM QuartzEntity where jobName = :jobName")
    QuartzEntity getQuartzByJobName(@Param("jobName") String jobName);
}
